@echo off
set VERSION=1.1.0
set WEB=http://code.google.com/p/core2/
set LICENCE=MPL 1.1
set DEBUG=0

if "%1"=="debug" (
set DEBUG=1
)

rem echo debug=%DEBUG%

echo [build unit tests for framework v%VERSION%]
copy /D buRRRn\tests\global.es+buRRRn\tests\global\*.es+buRRRn\tests\core2.es+buRRRn\tests\core2\*.es /A core2_UnitTests_v%VERSION%_tmp.es /A

if "%DEBUG%"=="0" (
..\bin\jsjuicer -smc "core2 Unit Tests v%VERSION% - %WEB% (%LICENCE%)" core2_UnitTests_v%VERSION%.es core2_UnitTests_v%VERSION%_tmp.es
) else (
  if exist core2_UnitTests_v%VERSION%_debug.es (
  del core2_UnitTests_v%VERSION%_debug.es
  )
type core2_UnitTests_v%VERSION%_tmp.es >> core2_UnitTests_v%VERSION%_debug.es
type EOF.txt >> core2_UnitTests_v%VERSION%_debug.es
)
del core2_UnitTests_v%VERSION%_tmp.es
echo ----------------
